package com.lykj.llw.box.adapter

import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lykj.lib_base.component.GlideApp
import com.lykj.llw.box.R
import com.lykj.llw.box.data.model.MineOptionModel

/**
 * ================================================
 * 我的页面列表选项适配器
 * ================================================
 *
 * @author gosha
 * @date 2023/6/21-10:35
 */
class MineOptionAdapter :
    BaseQuickAdapter<MineOptionModel, BaseViewHolder>(R.layout.item_mine_option) {
    override fun convert(holder: BaseViewHolder, item: MineOptionModel) {
        holder.setText(R.id.tv_name, "${item.name}")
        GlideApp.with(context)
            .load(item.icon)
            .transition(DrawableTransitionOptions.withCrossFade())
            .into(holder.getView(R.id.iv_icon))

//        if (item.isLast) {
//            holder.setVisible(R.id.v_splint_line, false)
//        } else {
//            holder.setVisible(R.id.v_splint_line, true)
//        }
    }
}